package com.ed100.sass.patter.composite;

public class TestComposite {

	public static void main(String[] args) {
		Market root = new MarketBranch("总公司");
		
		Market brach1 = new MarketBranch("浙江分公司");
		
		Market brach2 = new MarketBranch("宁波分公司");
		Market brach3 = new MarketBranch("上海分公司");
		
		Market brach4 = new MarketJoin("浙江直营店");
		Market branch5 = new MarketBranch("杭州分公司");
		
		brach1.add(brach2);
		brach1.add(branch5);
		
		root.add(brach1);
		root.add(brach3);
		root.add(brach4);
		
		root.payByCard();
	}

}
